import { gstyRequest } from '../'
export async function login(data) {
  return gstyRequest.post({
    url: '/account/login',
    showLoading: true,
    data
  })
}
//模型列表
export async function getModelList(params) {
  return gstyRequest.get({
    url: '/model/list',
    showLoading: true,
    params
  })
}
//模型列表
export async function getModelListNew(params) {
  return gstyRequest.get({
    url: '/model/getModelList',
    showLoading: true,
    params
  })
}
//模型类型列表
export async function getModelType(params) {
  return gstyRequest.get({
    url: '/model/type/list',
    showLoading: true,
    params
  })
}
// 模型验证
export async function modelVerifyResult(params) {
  return gstyRequest.get({
    url: '/model/verify/modelVerify',
    showLoading: true,
    params
  })
}
//模型详情
export async function getModelDetails(params) {
  return gstyRequest.get({
    url: '/model/detail',
    showLoading: false,
    params
  })
}
//注册
export async function registe(data) {
  return gstyRequest.post({
    url: '/model/add',
    showLoading: true,
    data
  })
}
//修改
export async function editModel(data) {
  return gstyRequest.post({
    url: '/model/modify',
    showLoading: true,
    data
  })
}
//删除
export async function delModel(data) {
  return gstyRequest.post({
    url: '/model/delete',
    showLoading: true,
    data
  })
}
//上传模型包附件
export async function resourcesUp(data) {
  return gstyRequest.post({
    url: '/resources/attached/upload',
    showLoading: true,
    data
  })
}
//上传图片
export async function pictureUp(data) {
  return gstyRequest.post({
    url: '/resources/picture/upload',
    showLoading: true,
    data
  })
}
// 查询模型评价内容
export async function getModelComments(params) {
  return gstyRequest.get({
    url: '/model/comments',
    showLoading: true,
    params
  })
}
// 添加模型评价
export async function addModelComment(data) {
  return gstyRequest.post({
    url: '/model/addModelComment',
    showLoading: true,
    data
  })
}
// 删除模型评价
export async function deleteModelComment(data) {
  return gstyRequest.post({
    url: '/model/deleteModelComment',
    showLoading: true,
    data
  })
}
